package com.example.demo.common;

import com.example.demo.entity.ArticleInfo;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * Description:
 * User: 故我
 * Date: 2023-11-13
 * Time: 20:27
 */
public class ModelArtList {
    public static void modelArtList(List<ArticleInfo> artlist) {
        for (ArticleInfo art : artlist) {
            String content = art.getContent();
            if (content.length() > 150) {
                content = content.substring(0, 150) + "   【此文章未完】 ... ... ... ... ... ... ...";
            }
            content = content.replace("#", "");
            art.setContent(content);
        }
    }
}
